<%@ include file="/includes.jsp" %>
<%@ include file="/header.jsp" %>


<form:form modelAttribute="events">
    <table>

    </table>
</form:form>

<h2>All Scheduled Events</h2>
<table>
  <thead>
  <tr>
    <th>Event</th>
    <th>Administrator</th>
    <th>Location</th>
    <th>Start Time</th>
    <th>End Time</th>
  </tr>
  </thead>
  <c:forEach var="event" items="${eventList}">
    <tr>
      <%-- The link here won't work because the user is not logged in  --%>
      <td><a href="/controller/event/form?id=${event.id}">${event.name}</a></td>
      <td>${event.administrator.firstName} ${event.administrator.lastName}</a>
      </td>
      <td>${event.location}</td>
      <td>${event.startTime}</td>
      <td>${event.endTime}</td>
    </tr>
  </c:forEach>
</table>


<%@ include file="/footer.jsp" %>
